<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../WEB-INF/template/user/userPageTemplateWhitoutSidebar.xhtml">

            <ui:define name="title">
                Edit
            </ui:define>

            <ui:define name="events">
                events
            </ui:define>

            <ui:define name="notifications">
                notifications
            </ui:define>

            <ui:define name="content">
                
                <h:form class="centeredFormHight">
                    <p:panel header="Profile">
                    <h:panelGrid columns="2">
                        
                        <h:outputText value="Email: "/>
                        <h:outputText id="email" value="#{editProfile.email}"/>
                        
                        <h:outputText value="Name: "/>
                        <p:inplace >
                            <p:inputText id="name" value="#{editProfile.name}" />
                        </p:inplace>

                        <h:outputText value="Surname: "/>
                        <p:inplace>
                            <p:inputText id="surname" value="#{editProfile.surname}"/>
                        </p:inplace>
                        
                        <h:outputText value="Password: "/>
                        <p:password id="password" value="#{editProfile.password}" feedback="true" match="confirm" label="Password"/>
                        
                        <h:outputText value="Confirm Password: "/>
                        <p:password id="confirm" label="Confirm Password"/>
                        
                        <p:commandButton value="Back" update="@all" action="#{editProfile.abort}"/>
                        
                        <p:commandButton value="Save" update="@all" action="#{editProfile.submitUserData}"/>
                    
                        
                    </h:panelGrid> 
                    </p:panel>
                </h:form>    
                
            </ui:define>

        </ui:composition>

    </body>
</html>
